function tq_scroll(obj, num){
     $(obj).css('position',"absolute");
     $(obj).css('top', num);     
      $(window).scroll(function() {
      offy = $(window).scrollTop();
      if(offy >= num){
        $(obj).css('top',offy+10)
        }else{
          $(obj).css('top',num)
        }
      });   
    }
    $(document).ready(function() {
            tq_scroll('#tq_wrap', 200);

            tq_scroll('#nav', 300);

      $('#nav').onePageNav({
        currentClass: 'current',
        changeHash: false,
        scrollSpeed: 350,      //滚动速度
        scrollThreshold: 0.5,  //滚动阈值
        filter: '',
        easing: 'swing',
        begin: function() {
            //I get fired when the animation is starting  当动画开始时释放
            // console.log(1);
        },
        end: function() {
            //I get fired when the animation is ending  当动画结束时释放
             var i = $('#nav li').index($('.current'));
            $('.section').eq(i).find('.box').removeClass('hide');
        },
        scrollChange: function($currentListItem) {
          var i = $('#nav li').index($currentListItem);
          $('.section').eq(i).find('.box').removeClass('hide');

            //I get fired when you enter a section and I pass the list item of the section
        }
      });  
      //烟雾flash 
      var opObjectParams = {};  
      opObjectParams.wmode = "transparent";
      opObjectParams.menu = "false";
      swfobject.embedSWF("yanwu.swf", "yanwu_flash", "300", "500", "9.0.0", "expressInstall.swf",null,opObjectParams);

      var opObject = {};  
      opObject.wmode = "transparent";
      opObject.menu = "false";
      swfobject.embedSWF("yanwu.swf", "yanwu_flash1", "200", "500", "9.0.0", "expressInstall.swf",null,opObject); 
        
});